<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>
	<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
	<?php
		require_once( 'muffin.class.php' );
		$muffin	= new Muffin( 'localhost', 'root', 'root', 'muffin' );
	?>
	<title>Muffin &bull; Nieuws Test</title>
</head>

<body>
	
	<!-- HET NIEUWS -->
	<?php foreach( $muffin->getNews(1) as $item ): ?>
	
		<h1><?=$item['titel']?></h1>
		<h3>geplaatst door <?=$item['auteur']?> op <?=$item['datum']?></h3>
		<p><?=nl2br($item['inhoud'])?></p>
		
		<hr />
		
	<?php endforeach; ?>
	
	
	<!-- DE PAGES -->
	<center>
	
	<!-- Vorige Knop -->
		<?php if ($muffin->page > 1): ?>
		
			<a href="?p=<?=$muffin->prevpage?>">&lsaquo;</a>
			
		<?php endif; ?>	
		
	<!-- De Pagina's -->
		<?php foreach( $muffin->getPages(1) as $page ): ?>
			
			<a href="?p=<?=$page;?>"><?=$page;?></a>
		
		<?php endforeach; ?>
		
	<!-- Volgende Knop -->
		<?php if ($muffin->page < $muffin->pcount): ?>
		
			<a href="?p=<?=$muffin->nextpage?>">&rsaquo;</a>
			
		<?php endif; ?>
		
	</center>

</body>

</html>